/**
 * 
 */
package com.mbengue.corp.apr.ra.beans;

import java.util.ArrayList;
import java.util.List;

import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

import com.mbengue.corp.apr.ra.core.Section;
import com.mbengue.corp.apr.ra.util.AprManagedBean;

/**
 * @author MMB11447
 *
 */
@ManagedBean(name = "sectionsBean")
@SessionScoped
public class SectionsBean extends AprManagedBean {

	private List<Section> sections;
	
	@PostConstruct
    public void init() {
		sections = new ArrayList<Section>();
		for(int i=0;i<2;i++) {
			Section section = new Section();
			section.setNom("Section " + i);
			section.setDescription("Description " + i);
			
			/*Image image = new Image("", "/resources/images/dock/actu.png", "");
			section.setLogo(image);*/
			sections.add(section);
        }
    }

	/**
	 * @return the sections
	 */
	public List<Section> getSections() {
		return sections;
	}

	/**
	 * @param sections the sections to set
	 */
	public void setSections(List<Section> sections) {
		this.sections = sections;
	}
}
